import http from "@/http/index.ts"
import {Dept,DeptListParam} from '@/api/dept/type.ts'


// 新增部门
export const addApi = (data: Dept) => {
    return http.post("/admin/acl/dept/createDept", data)
}


// 编辑
export const editApi = (data: Dept) => {
    return http.put("/admin/acl/dept/updateDept", data)
}

// 分页条件查询列表
export const getListApi = (data:DeptListParam) => {
    return http.get("/admin/acl/dept/deptPageList",data)
}

// 树形列表
export const getTreeListApi = () => {
    return http.get("/admin/acl/dept/treeList")
}



// 删除
export const deleteApi = (id: number) => {
    return http.delete(`/admin/acl/dept/deleteDept/${id}`)
}

